n = 1000
q = 0.4
beta = 0.8
set.seed(7)
rdw = rdweibull(n = n, q = q, beta = beta)
plot(prop.table(table(rdw)), type = "h", col = "gray50")
x = 0:max(rdw)
lines(x, ddweibull(x = x, q = q, beta = beta), type = "o", col = "blue", lwd = 2)
hist(pdweibull(x = rdw, q = q, beta = beta))
plot(ecdf(rdw))
lines(x, pdweibull(x, q = q, beta = beta), col = "blue", lwd = 2, type = "s")
Run the code above in your browser using DataLab